package com.yami.shop.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yami.shop.bean.model.Blog;
import com.yami.shop.bean.model.UserCollectionDtc;
import com.yami.shop.bean.vo.UserCollectionDtcVO;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.dao.UserCollectionDtcMapper;
import com.yami.shop.service.UserCollectionDtcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户收藏表
 *
 * @author xwc
 * @date 2019-04-19 16:57:20
 */
@Service
public class UserCollectionDtcServiceImpl extends ServiceImpl<UserCollectionDtcMapper, UserCollectionDtc> implements UserCollectionDtcService {

    @Autowired
    private UserCollectionDtcMapper userCollectionDtcMapper;
    @Override
    public IPage<UserCollectionDtcVO> pageBlog(PageParam page,String userId) {
        return userCollectionDtcMapper.pageBlog(page,userId);
    }

    @Override
    public void deteleByUserIdAndProdId(String userId, String type, List<Long> ids) {
        userCollectionDtcMapper.deteleByUserIdAndProdId(userId, type, ids);
    }

    @Override
    public IPage<Blog> pageUserBrowseHistory(PageParam<Blog> page, String currentId, String content) {
        return userCollectionDtcMapper.pageUserBrowseHistory(page, currentId, content);
    }
}
